package de.tub.bazinga.object;

import java.util.LinkedList;
import java.util.List;

public class ColorPool {

	private final List<Color> colors;

	public ColorPool() {
		colors = new LinkedList<Color>();
	}

	public void addColor(Color color) {
		colors.add(color);
	}

	public Color getNextColor() {
		if (hasNextColor()) {
			Color color = colors.get(0);
			colors.remove(0);
			return color;

		}

		return null;
	}

	public boolean hasNextColor() {
		return colors.size() > 0;
	}
}
